package com.anjubao.parking.municipal.parkinglot.util;

import com.anjubao.parking.municipal.parkinglot.form.ParkingLotSlotForm;
import com.anjubao.parking.municipal.parkinglot.model.ParkingLotSlot;

public class FormTransfer {

    /**
     * 封装停车场车位实体
     * @param parkingLot
     * @param parkingLotSlotFrom
     * @return
     */
    public static ParkingLotSlot from2ParkingLotSlot(ParkingLotSlot parkingLot, ParkingLotSlotForm parkingLotSlotFrom) {
        parkingLot.setName(parkingLotSlotFrom.getName());
        parkingLot.setNote(parkingLotSlotFrom.getNote());
        parkingLot.setParkingLotCode(parkingLotSlotFrom.getParkingLotCode());
        parkingLot.setType(0);
        parkingLot.setStatus(0);
        return parkingLot;
    }
}
